<script type="text/javascript">
    $(function(){
        $('.dropdown-toggle').dropdown();
    });
</script>
<?php
/* @var $this BackendController */
/* @var $model User */

$this->breadcrumbs=array(
	'Users'=>array('index'),
	$model->name,
);

$this->menu=array(
    array('label'=>'<span class="glyphicon glyphicon-user"></span>&nbsp'.Yii::t('UserModule.base','Manage Users'), 'url'=>array('/user/backend/admin')),
    array('label'=>'<span class="glyphicon glyphicon-plus"></span>&nbsp'.Yii::t('UserModule.base','Create User'), 'url'=>array('/user/backend/create')),
    array('label'=>'<span class="glyphicon glyphicon-list"></span>&nbsp'.Yii::t('UserModule.base','List Users'), 'url'=>array('/user/backend/index')),

    array('label'=>'<span class="glyphicon glyphicon-wrench "></span>&nbsp'.Yii::t('UserModule.base','Operations').'&nbsp<span class=caret></span>','url'=>array('#'),'itemOptions'=>array('class'=>'dropdown','aria-labelledby'=>'dLabel'),'items'=>array(
        array('label'=>'<span class="glyphicon glyphicon-refresh"></span>&nbsp'.Yii::t('UserModule.base','Update User'), 'url'=>array('update', 'id'=>$model->id),'linkOptions'=>array('role'=>'menuitem','tabindex'=>-1),'itemOptions'=>array('class'=>'dropdown','role'=>'presentation')),
        array('label'=>'<span class="glyphicon glyphicon-trash"></span>&nbsp'.Yii::t('UserModule.base','Delete User'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>Yii::t('UserModule.base','Are you sure you want to delete this item?'))),

    ),
        'submenuOptions'=>array('class'=>'dropdown-menu', 'role'=>"menu",'aria-labelledby'=>"drop1"),
        'linkOptions'=>array('class'=>'dropdown-toggle','id'=>'dLabel','data-toggle'=>'dropdown'),

    ),
);
?>


<div class="panel panel-default">
    <div class="panel-heading">
        <span class="h4"><?php echo Yii::t('UserModule.base','View User')?></span>
    </div>
    <div class="panel-body">
        <?php if(Yii::app()->user->hasFlash('success')):?>
            <div class="alert alert-success">
                <?php echo Yii::app()->user->getFlash('success');?>
            </div>
        <?php endif;?>

    <?php $this->widget('zii.widgets.CDetailView', array(
        'data'=>$model,
        'attributes'=>array(
            'id',
            array(
                'label'=>Yii::t('UserModule.base','Avatar'),
                'type'=>'raw',
                'value'=>CHtml::image('/images/avatar/'.$model->avatar,Yii::t('UserModule.base','User avatar'),array('style'=>'height:100px','title'=>$model->avatar)),
            ),
            'name',
            'login',
            'email',
            array(
                'label'=>Yii::t('UserModule.base','create_time'),
                'type'=>'raw',
                'value'=>$model->getCreateTime(),
            ),
            array(
                'label'=>Yii::t('UserModule.base','update_time'),
                'type'=>'raw',
                'value'=>$model->getUpdateTime(),
            ),


            array(
                'label'=>Yii::t('UserModule.base','create_user_id'),
                'type'=>'raw',
                'value'=>'<i>'.Yii::t('UserModule.base','name').'</i>'.' : '.$model->getCreateUserIdOptions()->name.' | '.'<i>'.Yii::t('UserModule.base','login').'</i>'.' : '.$model->getCreateUserIdOptions()->login.' | '.
                '<i>'.Yii::t('UserModule.base','role').'</i>'.' : '.$model->getCreateUserIdOptions()->role,
            ),

            array(
                'label'=>Yii::t('UserModule.base','update_user_id'),
                'type'=>'raw',
                'value'=>'<i>'.Yii::t('UserModule.base','name').'</i>'.' : '.$model->getUpdateUserIdOptions()->name.' | '.'<i>'.Yii::t('UserModule.base','login').'</i>'.' : '.$model->getUpdateUserIdOptions()->login.' | '.
                '<i>'.Yii::t('UserModule.base','role').'</i>'.' : '.$model->getUpdateUserIdOptions()->role,
            ),

            'role',
            array(
                'label'=>Yii::t('UserModule.base','active'),
                'type'=>'raw',
                'value'=>$model->getActiveOptions(),
            ),
            array(
                'label'=>Yii::t('UserModule.base','login_time'),
                'type'=>'raw',
                'value'=>$model->getLoginTimeFormat(),
            ),
            array(
                'label'=>Yii::t('UserModule.base','last_login_time'),
                'type'=>'raw',
                'value'=>$model->getLastLoginTimeFormat(),
            ),
        ),
    )); ?>
    </div>

</div>



